home *** CD-ROM | disk | FTP | other *** search
- ''--------------------------------------------------------------------
- '' Professor MULTIMEDIA CD-specific install functions
- '' Copyright (c) 1993 Individual Software, Inc.
- ''--------------------------------------------------------------------
-
- '' Variable for network installs - "0" = Standalone Version, "1" = Network Version
-
- NETINSTALL% = 0
-
- '' Set up product-specific titles, etc.
- SUB SetProductTitles STATIC
- SetTitle "Sound Galaxy Setup" ''Setup Window Title
- PMMAPP$ = "Professor MULTIMEDIA" ''Text under the icon
- END SUB
-
-
- FUNCTION InfFile() STATIC AS STRING
- InfFile = "PMM.INF"
- END FUNCTION
-
-
- FUNCTION MakeInstDir(D$) STATIC AS STRING
-
- S$ = D$ + ":\SG16"
-
- MakeInstDir = S$
-
- END FUNCTION
-
-
- SUB AddInfSectionNames(BASE$, SOUNDS$, BASEINST$, SOUNDSINST$) STATIC
-
- '' These are the base files we can install
- AddListItem BASE$, "Base Files"
- SetSymbolValue BASEINST$, GetSymbolValue(BASE$)
-
-
- '' By default, we install all the above
- '' SetSymbolValue SOUNDSINST$, GetSymbolValue(SOUNDS$)
-
- '' The user probably doesn't want all these on the HD by default
- '' AddListItem SOUNDS$, "Video Samples"
-
- END SUB
-
-
- SUB RecalcPath STATIC
- CursorSave% = ShowWaitCursor()
- RecalcOptFiles BASEFILES
- RecalcOptFiles SOUNDFILES
- RestoreCursor CursorSave%
- END SUB
-
-
- SUB AddOptFiles STATIC
- AddOptFilesToCopyList BASEFILES
- AddOptFilesToCopyList SOUNDFILES
- END SUB
-
-
- SUB AddOptFilesToCopyList (ftype%) STATIC
-
- IF GetListItem(CHECKSTATES$, ftype%) = "ON" THEN
- SrcDir$ = GetSymbolValue("STF_SRCDIR")
- IF ftype% = BASEFILES THEN
- ''Base files
- l% = GetListLength(BASEINST$)
- FOR i% = 1 TO l% STEP 1
- AddSectionFilesToCopyList GetListItem(BASEINST$, i%), SrcDir$, DEST$
- NEXT i%
-
- AddSectionFilesToCopyList "ToolBook", SrcDir$, DEST$
-
- '' Install Video for Windows runtime
- AddSectionFilesToCopyList "Media Player", MakePath(SrcDir$, "STUP\VFW"), WINDIR$
- AddSectionFilesToCopyList "VFW Runtime", MakePath(SrcDir$, "STUP\VFW"), SYSDIR$
- AddSectionFilesToCopyList "Codecs", MakePath(SrcDir$, "STUP\VFW"), WINDIR$
- AddSectionFilesToCopyList "Cinepak Codec", MakePath(SrcDir$,"STUP\VFW"), SYSDIR$
-
- ''--ELSEIF ftype% = SOUNDFILES THEN
- '' l% = GetListLength(SOUNDSINST$)
- '' FOR i% = 1 TO l% STEP 1
- '' AddSectionFilesToCopyList GetListItem(SOUNDSINST$, i%), SrcDir$, DEST$
- ''----- NEXT i%
- END IF
- SrcDir$ = ""
- END IF
-
- END SUB
-
-
- SUB SetDriveStatus STATIC
- FITS% = 0
- drive$ = MID$(DEST$, 1, 1)
- ndrive% = ASC(ucase$(drive$)) - ASC("A") + 1
-
- cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
- cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
-
- free& = GetFreeSpaceForDrive(drive$)
-
- IF cost& > free& THEN
- FITS% = 1
- END IF
- ReplaceListItem DRIVETEXT$, 1, drive$ + ":"
- ReplaceListItem DRIVETEXT$, 2, STR$(cost& / 1024) + " K"
- ReplaceListItem DRIVETEXT$, 3, STR$(free& / 1024) + " K"
-
-
- '' IF drive$ = WINDRIVE$ THEN
- '' ReplaceListItem DRIVETEXT$, 4, ""
- '' ReplaceListItem DRIVETEXT$, 5, ""
- '' ReplaceListItem DRIVETEXT$, 6, ""
- '' ELSE
- '' ndrive% = ASC(ucase$(WINDRIVE$)) - ASC("A") + 1
-
- '' cost& = VAL(GetListItem(BASENEEDS$, ndrive%))
- '' cost& = cost& + VAL(GetListItem(SOUNDNEEDS$, ndrive%))
-
- '' IF cost& = 0 THEN
- '' ReplaceListItem DRIVETEXT$, 4, ""
- '' ReplaceListItem DRIVETEXT$, 5, ""
- '' ReplaceListItem DRIVETEXT$, 6, ""
- '' ELSE
- '' free& = GetFreeSpaceForDrive(WINDRIVE$)
- '' IF cost& > free& THEN
- '' FITS% = 1
- '' END IF
- '' ReplaceListItem DRIVETEXT$, 4, WINDRIVE$ + ":"
- '' ReplaceListItem DRIVETEXT$, 5, STR$(cost& / 1024) + " K"
- '' ReplaceListItem DRIVETEXT$, 6, STR$(free& / 1024) + " K"
- '' END IF
- '' END IF
- END SUB
-
-
- '' Add billboard dialogs for this app
- SUB AddBillboards STATIC
- AddToBillboardList CUIDLL$, BBD1, "FModelessDlgProc", 100
- AddToBillboardList CUIDLL$, BBD6, "FModelessDlgProc", 100
- END SUB
-
-
- SUB ConfigureApps STATIC
-
- '' This is so Fixer can find where we're installed
- CreateIniKeyValue WININI$, "ProfMultiMedia", "PMM", DEST$+"\PMM", cmoOverwrite
-
- '' This is the name of the group we'll install into
- GROUP$ = "Individual Software"
- GROUP2$ = "SG Audio Apps & Utilities"
-
- '' Configure base applications
- IF GetListItem(CHECKSTATES$, BASEFILES) = "ON" THEN
-
- MakeGroup:
- '' Create a group for us...
- CreateProgmanGroup GROUP$, "", cmoNone
- CreateProgmanGroup GROUP2$, "", cmoNone
-
- '' Setup PMM Program
- ''--CreateProgmanItem GROUP$, PMMAPP$, MakePath(DEST$,"tbook.exe")+" "+CDDRV$+"mainmenu.tbk", MakePath(DEST$,"PMM.ICO"), cmoOverwrite
- CreateProgmanItem GROUP$, PMMAPP$, MakePath(DEST$+"\PMM\","PMM.EXE"),"" , cmoOverwrite
-
- '' Setup LRNWIN Program
- CreateProgmanItem GROUP$, "Learn Windows", MakePath(DEST$+"\LRNWIN\","LRNWIN.EXE"),"" , cmoOverwrite
-
- '' Setup AZTEC Utilities Program
- CreateProgmanItem GROUP2$, "WinDAT", MakePath(DEST$+"\VOYETRA\WINDAT\","WINDAT.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Say It", MakePath(DEST$+"\VOYETRA\WINDAT\","SAYIT.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Audiostation", MakePath(DEST$+"\VOYETRA\WINDAT\","AUDIOSTA.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "MIDI Orchestrator", MakePath(DEST$+"\VOYETRA\WINDAT\","ORCH.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Audio Calendar", MakePath(DEST$+"\VOYETRA\WINDAT\","CAL.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Sound Events", MakePath(DEST$+"\VOYETRA\WINDAT\","SNDEVENT.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Sound Script", MakePath(DEST$+"\VOYETRA\WINDAT\","SSCRIPT.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "VoiceNet", MakePath(DEST$+"\VOYETRA\WINDAT\","VOICENET.EXE"),"" , cmoOverwrite
- CreateProgmanItem GROUP2$, "Windows JukeBox", MakePath(DEST$+"\VOYETRA\JUKEBOX\","WJUKE.EXE"),"" , cmoOverwrite
- '' CreateProgmanItem GROUP2$, "Monologue", MakePath(DEST$+"\MONOLOG\","MONOLOGW.EXE"),"" , cmoOverwrite
- '' CreateProgmanItem GROUP2$, "Dict. Manager", MakePath(DEST$+"\MONOLOG\","DICTMGR.EXE"),"" , cmoOverwrite
- '' CreateProgmanItem GROUP2$, "ComVoice", MakePath(DEST$+"\COMVOICE\","COMVOICE.EXE"),"" , cmoOverwrite
-
-
- '' Setup Video for Windows
- CreateIniKeyValue SYSINI$, "Drivers", "VIDC.MSVC", "msvidc.drv", cmoNone
- CreateIniKeyValue SYSINI$, "Drivers", "VIDC.RT21", "indeo.drv", cmoNone
- CreateIniKeyValue SYSINI$, "mci", "AVIVideo", "mciavi.drv", cmoNone
- CreateIniKeyValue WININI$, "mci extensions", "avi", "AVIVideo", cmoNone
-
- ''------------------------------------------------------CinePak
- 'This routine should be run whether or not the files are copied.
- 'This is because the existence of the files on disk is not a
- 'guarantee of correct installation!
-
- 'Updating CONTROL.INI and SYSTEM.INI
- CreateIniKeyValue GetWindowsDir() + "control.ini", "Userinstallable.drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
- CreateIniKeyValue GetWindowsDir() + "control.ini", "related.desc", "VIDC.CVID", "", cmoOverwrite
- CreateIniKeyValue GetWindowsDir() + "system.ini", "drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
- ''------------------------------------------------------
-
- '' Hack because the MIDI files have goofs in them...
- CreateIniKeyValue SYSINI$, "mciseq.drv", "disablewarning", "true", cmoNone
-
- res% = Run("regedit.exe /s " + MakePath(WINDIR$, "mplayer.reg"))
- '' res% = Run("profdisp.exe")
-
- END IF
-
- END SUB
-
-
-
- '' Remove all files and directories...
-
- SUB DoUninstall STATIC
- '' res% = sndPlaySound(MakePath(INSTSNDDIR$, "v13.wav"), 3)
- IF IDYES = DoMsgBox("Are you sure you want to remove the NOVA16 programs from your system?", "Aztech", MB_YESNO) THEN
- DEST$ = GetIniKeyString(WININI$, "ProfMultiMedia", "PMM")
-
- IF DEST$ <> "" THEN
- old% = ShowWaitCursor()
-
- RemDirectory DEST$
-
- RestoreCursor old%
-
- i% = DoMsgBox("The NOVA16 programs have been removed. You can run Setup later to re-install them.", "Aztech", MB_OK)
- END
- ELSE
- i% = DoMsgBox("The NOVA16 programs have are not installed or cannot be found!", "Aztech", MB_OK)
- END IF
- END IF
- END SUB
-